{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Batched Graph Classification with DGL\n",
    "\n",
    "Graph classification is an important problem with applications across many fields – bioinformatics, chemoinformatics, social network analysis, urban computing and cyber-security. Applying graph neural networks to this problem has been a popular approach recently ( Ying et al., 2018, Cangea et al., 2018, Knyazev et al., 2018, Bianchi et al., 2019, Liao et al., 2019, Gao et al., 2019).\n",
    "\n",
    "\n",
    "### This tutorial demonstrates:\n",
    "\n",
    "- batching multiple graphs of variable size and shape with DGL\n",
    "- training a graph neural network for a simple graph classification task\n",
    "\n",
    "\n",
    "## Simple Graph Classification Task\n",
    "\n",
    "In this tutorial, we will learn how to perform batched graph classification with dgl via a toy example of classifying 8 types of regular graphs as below:\n",
    "\n",
    "![](img/SimpleGraphClassificationTask.png)\n",
    "\n",
    "We implement a synthetic dataset data.MiniGCDataset in DGL. The dataset has 8 different types of graphs and each class has the same number of graph samples.\n",
    "我们在DGL中实现了一个合成数据集data.MiniGCDataset。 数据集有8种不同类型的图形，每个类具有相同数量的图形样本。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEICAYAAABbOlNNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XtcVGX+B/DPwAAzIzIiQioq5hVvmAJeQJQoM0hMSGtN1jT9VZq7+ctL6e6WWq275uW1/kxsy7RSN0sUFcHa8oKuZoOXBdQAFUVBHbwhyHWY8/vjBDnmBWYOc+byeb9evl46Z+aZ76DO5zzPeZ7nKARBEEBERPQLF7kLICIi28JgICIiEwwGIiIywWAgIiITDAYiIjLBYCAiIhMMBqJ7mD9/PhISEuQug0gWDAZyWhs3bkRIS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AlQqFVq2bIm2bdvWn/UPGDAAgwYNQrNmzRpf+4PEx4vbXHCTRafBYCCHZDAYsGvXLmzfvh0//vgjzp49i9u3b0OlUqF9+/YoKChAVVUV1Go15s+fj9mzZ4t3sZPwS/Dw4cMYM2YMiouLUVFR8etd8iDeZvXAgQM4cuQITp48iXPnzuHKlSv1a0FcXV3h6ekJPz8/BAQEoHv37ujfvz/Cw8PRtWtX697ARuKwJNvHYCCnUVpaiq1bt2LLli3Ytm2bybFWrVph1fz5eO7NN+FSXW3+m6hUqMrLw9xly7Bq1SpUVVXBxcUF/fv3h16vx7Vr11BeXl5/1t+iRQu0bdsWnTt3Ru/evREaGoqwsDBoJVqRLhkbH14jaTEYyOmkpqbi2WefhVqtRnV1Ndq3b482bdrgf27exJisLKgtaLvKxQXvAFh8xwwfhUKBfv36YcCAAejXrx/CwsLQs2dP+7ttpZ1ekKfGYzCQ0zl9+jQ2bdqEJ554AiEhIb/eJCYhAdiwweL2C6OisC4qChs3bsTZs2dhMBiwbt06jB8/3uK2ZWcHkxPIcgwGojqxsUBKiuXt3LGY69y5c/jmm28QExODXr16Wd62rbCjyQnUeAwGojoS9Ri4mIvsnZ0NchI1IQl2moVaLZ45E9kx9hiI6nAxFxEA9hiIfiXhTrNE9ow9BqI7cTEXEXsMRCZCQ8X59xpN415Xt5iLoUAOgPd8Jrpb3aIsLuYiJ8WhJKL74WIuclIMBqKH4WIucjIMBiIiMsGLz0REZILBQEREJhgMRERkgsFAREQmGAxERGSCwUBERCYYDEREZILBQEREJhgMRERkgsFAREQmGAxERGSCwUBERCYYDEREZILBQEREJhgMRERkgsFAREQmGAxERGSCwUBERCYYDEREZILBQEREJhgMRERkgsFAREQmGAxERGSCwUBERCYYDEREZILBQEREJhgMRERkgsFAREQmGAxERGSCwUBERCYYDEREZILBQEREJv4fwjSyW4wFgNkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from dgl.data import MiniGCDataset\n",
    "import matplotlib.pyplot as plt\n",
    "import networkx as nx\n",
    "# A dataset with 80 samples, each graph is\n",
    "# of size [10, 20]\n",
    "dataset = MiniGCDataset(80, 10, 20)\n",
    "graph, label = dataset[0]\n",
    "fig, ax = plt.subplots()\n",
    "nx.draw(graph.to_networkx(), ax=ax)\n",
    "ax.set_title('Class: {:d}'.format(label))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEICAYAAAC3Y/QeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XlcVPX6B/DPmYVZQBBwUEDEhXLHRHBfUNxQQ9Esc7mK6U2pLC0tu279Ku2SS1Zq3dS0UtOUwAVXRHNL0VA090BBRTYR2Rlmnt8fk+TONnBmed6vF6+uMnPOZ7zwnHO+q0BEBMYYY1ZFInYAxhhjNY+LP2OMWSEu/owxZoW4+DPGmBXi4s8YY1aIiz9jjFkhLv7Mas2bNw+jR48WOwZjouDizyza+vXr4evrCzs7O7i6uiIwMBCHDx8WOxYAYPbs2WjdujVkMhnmzZsndhxmZbj4M4u1ePFivPPOO/jwww+RmpqKpKQkhIaGIjIyUuxoAAAvLy+EhYVh4MCBYkdhVoiLP7NI2dnZmDNnDpYtW4ahQ4fC1tYWcrkcL774Ij7//PMnvmf48OGoV68eHBwc0L17d/z555+l34uKikKLFi1Qq1YtuLu7Y+HChQCAjIwMDBo0CLVr14aTkxO6desGvV5froxjx45FYGAgatWqVfUPzFgFcfFnFunYsWMoLCxEcHBwud8TGBiIK1euIC0tDT4+Phg1alTp91577TV8++23yMnJwblz59CrVy8AwKJFi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duXMH9vb2iI+Px7Jly3D8+HGxIzH2VDzJyxLwpBjRHTt2DJ07d4ZcLkdJSQmkUinmzp2LWbNmiR2NsSfiO39LwJNiRNe+fXu0bt0aWq0WRASZTIbRo0eLHYuxp+Libyl4UoyopFIpNm7cCIVCAcAw27dhw4bihmLsGbj4WwqeFCO65s2bY/rfHZLjxo0TNwxjZeA2f0tT1qqe9wmC4Y6fJ8UYlVarhZ2dHQ4dOoT27duLHYexp+Lib4lOnjSs1RMVZSjyD675o1IZLgoDBhiaeviO37jS0rCiQwcEe3mhnlJpGIbr7Q2EhHCfCjMpXPwtGU+KqTkPbKBTpNVCodP98737F9y/N9CBn594ORn7Gxd/xqqKm9qYGeIZvoxVRUU20CEyvO699wx/5gsAExHf+TNWWbGxgL9/hTfQAWAYZXXwIPe5MNHwUE/GKos30GFmjO/8GasMXlKDmTm+82esMngDHWbmuPgzVhm8gQ4zc1z8GasM3kCHmTku/oxVBm+gw8wcF3/GKoM30GFmjkf7MFYZPNqHmTm+82esMngDHWbm+M6fscriGb7MjPGdP2OVxRvoMDPGC7sxVhX3F2fjVT2ZmeFmH8aMgTfQYWaGiz9jxsQb6DAzwcWfMcasEHf4MsaYFeLizxhjVoiLP2OMWSEu/owxZoW4+DPGmBXi4s8YY1aIiz9jjFkhLv6MMWaFuPgzxpgV4uLPGGNWiIs/Y4xZIS7+jDFmhbj4M8aYFeLizxhjVoiLP2OMWSEu/owxZoW4+DPGmBXi4s8YY1aIiz9jjFkhLv6MMWaFuPgzxpgV4uLPGGNWiIs/Y4xZIS7+jDFmhbj4M8aYFeLizxhjVoiLP2OMWSEu/owxZoW4+DPGmBXi4s8YY1aIiz9jjFkhLv6MMWaF/h/xeqqlYY/QIgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "graph, label = dataset[10]\n",
    "fig, ax = plt.subplots()\n",
    "nx.draw(graph.to_networkx(), ax=ax)\n",
    "ax.set_title('Class: {:d}'.format(label))\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Form a graph mini-batch\n",
    "\n",
    "To train neural networks more efficiently, a common practice is to batch multiple samples together to form a mini-batch. 为了更有效地训练神经网络，通常的做法是将多个样本一起批处理以形成小批量。\n",
    "\n",
    "Batching fixed-shaped tensor inputs is quite easy (for example, batching two images of size 28×28 gives a tensor of shape 2×28×28). 批量固定形状的张量输入非常容易（例如，批量处理两个尺寸为28×28的图像会产生2×28×28的张量）。\n",
    "\n",
    "By contrast, batching graph inputs has two challenges:\n",
    "\n",
    "- Graphs are sparse.\n",
    "- Graphs can have various length (e.g. number of nodes and edges).\n",
    "\n",
    "To address this, DGL provides a dgl.batch() API. \n",
    "\n",
    "It leverages the trick that a batch of graphs can be viewed as a large graph that have many disjoint connected components. 它利用了一批图表可以被视为具有许多不相交的连接组件的大图形的技巧。\n",
    "\n",
    "Below is a visualization that gives the general idea:\n",
    "\n",
    "![](img/batch.png)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
